import {Notify} from 'quasar'

const MsgUtil = {}

MsgUtil.sendSuccess = function (msg) {
  Notify.create({
    message: msg,
    avatar: require('../assets/logo/60_60/11.png'),
    color: 'green',
    timeout: '1000',
    position: 'top-right'
  })
}

MsgUtil.sendErr = function (msg) {
  Notify.create({
    message: msg,
    // avatar: require('../assets/logo/60_60/11.png'),
    color: 'red',
    timeout: '1000',
    position: 'top-right'
  })
}
MsgUtil.sendWarn = function (msg) {
  Notify.create({
    message: msg,
    avatar: require('../assets/logo/60_60/11.png'),
    color: 'purple',
    timeout: '1000',
    position: 'top-right'
  })
}
MsgUtil.send = function (msg, color, avatar, timeout, position) {
  Notify.create({
    message: msg,
    avatar: require(avatar ? avatar : "../assets/logo/60_60/11.png"),
    color: color ? color : "green",
    timeout: timeout ? timeout : "1000",
    position: position ? position : "top-right",
  })
}

export default MsgUtil
